import { useEffect } from 'react';
import { useState } from 'react'
import MyComponent from './MyComponent'


function App() {
  const [staisfactionLevel, setStaisfactionLevel] = useState(300);
  console.log('App 更新了');
  useEffect(() => {
    setTimeout(() => {
      setStaisfactionLevel(303)
    }, 3000);
  }, [])
  return (
    <div className="App">
      <input
        type="range"
        min="0"
        max="500"
        value={staisfactionLevel}
        onChange={(event) => setStaisfactionLevel(+event.target.value)}
      />
      <MyComponent level={staisfactionLevel} />
    </div>
  )
}

export default App
